#ifndef OBJECT_HH
# define OBJECT_HH

# include <boost/shared_ptr.hpp>

# include <math/vector.hh>

# include "../interfaces/displayable.hh"
# include "bounding.hh"


class Object: public Displayable
{
public:
  Object () {}

  Object (const Vector3f& pos, const Vector3d& rotate, Bounding* bounding):
    pos_ (pos),
    rotate_ (rotate),
    bounding_ (bounding),
    selected_ (false)
  {
  }

  void update (const boost::shared_ptr<Object>& o) { pos_ = o->pos_; }
  void update (const Vector3f& v, const Vector3d& vr) { pos_ = v; rotate_ = vr; }

  const Vector3f& pos () const { return pos_; }
  const Vector3d& rotate () const { return rotate_; }
  const Bounding* bounding () const { return bounding_; }

  void rotate (const Vector3d& rotate) { rotate_ = rotate; }

  bool selected () const { return selected_; }
  void selected (bool val) { selected_ = val; }

protected:
  Vector3f pos_;
  Vector3d rotate_;
  Bounding* bounding_;
  bool selected_;
};

#endif /// !OBJECT_HH
